<html>
<head>
	<script type="text/javascript" src="scripts.js"></script>
	<style>
		body{
			text-align: center;
		}
		a{
			font-family: Helvetica;
			font-size: 12px;
			
		}
		.encabezado{
			font-family: Helvetica;
			font-size: 13px;
		}
		i{
			font-family: Helvetica;
			font-size: 12px;
			font-weight: bold;
		}
		.peticionAceptada{
			font-family: Helvetica;
			font-size: 13px;
			color:red;
			font-weight: bold;	
		
		}
		.peticion{
			font-family: Helvetica;
			font-size: 13px;
			color:blue;
			font-weight: bold;	
		
		}
		.enlace
		{
			font-family: Helvetica;
			font-size: 13px;
			color:blue;
			font-weight: bold;	
		}

	</style>
	
</head>
<body>
	<div id='seleccionador'>
		<img src="http://mexico.myavayaevolutions.com/images/adapare.jpg">
		<br><br>
		<form id='palabras' name='palabras' method="post" action="javascript: formus(document.getElementById('palabras'),'buscador/muestra.php','muestra');">
			<select id='seleccion' onChange="document.palabras.submit()" name='seleccion'>
				<?php 
					$link=mysql_connect("localhost","root","");
					mysql_select_db("buscador");
					$query="SELECT DISTINCT clave FROM peticiones";
					$consulta=mysql_query($query,$link);
					$resultado=mysql_num_rows($consulta);
					if($resultado<1)
					{
						echo "<option value='0'>No hay busquedas realizadas</option>";
					}
					else
					{
						echo "<option value='0'></option>";
						while($row=mysql_fetch_array($consulta))
						{
							echo "<option value='".$row['clave']."'>".$row['clave']."</option>";
						}
					}
				?>
			</select>
		</form>
		<div id='guardar'>
			<form id='imprime' name='imprime' action="javascript: formus(document.getElementById('imprime'),'buscador/parte.php','guardar');" method='post'>
			<input type="submit" value="Guardar tickets en XLS">
			</form>
		</div>
	</div>
	<div id='muestra'>
	</div>
</body>
</html>